<template>
	<view class="app-aboutus">
	<!-- 	<u-navbar   :background="background" :immersive="true">
		</u-navbar> -->
		
		<view class="content">
			<view class='title' v-if="getBulletin.title">{{getBulletin.title}}</view>
			<view class="time">
				{{getBulletin.time}}
			</view>
			<rich-text class="p" :nodes="modifiedContent"></rich-text>
		</view>
	</view>
</template>

<script>
import {mapGetters} from 'vuex'
import {pageback} from '../../common/js/util.js'
export default {
	data() {
		return {
			background:'#ffffff',
			title: '',
			modifiedContent:''
		}
	},
	computed: {
		// modifiedContent() {
		// 	let str = this.getBulletin.content
		// 	return str.replace(/(\<img|\<image)/ig, '<img style="max-width:100% !important;width: 98% !important;"')
		// },
		i18n() {
			return this.$t('message')
		},
		...mapGetters([
			'getBulletin',
			'getLoginInfo',
			'getRequestUrl',
			'getLangType'
		])
	},
	methods: {
		tapNavLeft() {
			pageback();
		}
	},
	onLoad(e) {
		if(this.getLangType!='chs'){
			uni.setNavigationBarTitle({
				title:'详情'
			})
		}else if(this.getLangType=='en'){
			uni.setNavigationBarTitle({
				title:'Details'
			})
		}else{
			uni.setNavigationBarTitle({
				title:'詳情'
			})
		}
	},
	onShow(){
		// console.log(this.getBulletin);
		this.title = this.getBulletin.title;
		this.modifiedContent = this.getBulletin.content;
		this.modifiedContent.replace(/(\<img|\<image)/ig, '<img style="max-width:100% !important;width: 98% !important;"')
		// console.log(typeof this.modifiedContent);
	},
	components: {
	}
}
</script>
<style>
	page{
		/* background: #ffffff !important; */
	}
</style>
<style lang="scss" scoped>
	.nav-bar{
		padding: 0 30rpx;
		image{
			width: 48rpx !important;
			height: 48rpx ;
			flex-shrink: 0;
		}
	}
	.time{
		font-size: 24rpx;
		color: rgba(#ffffff, .7);
		padding: 0 0 56rpx;
	}
.app-aboutus {
	.index-top-nav-title{
		// padding-left: 30upx;
		width: 100%;
		font-size: 36upx;
		text-align: center;
		// background: #FFFFFF;
		color: rgba(#ffffff, 1);;
		display: flex;
		align-items: center;
		justify-content: space-between;
		.leftIcon{
			width: 80upx;
		}
		.rightIcon{
			width: 80upx;
		}
		.index-top-nav-title-content{
			flex: 1;
		}
	}
	.content{
		margin: 30upx;
		.title{
			padding: 32upx 0 24upx 0;
			line-height: 1;
			font-size: 36rpx;
			word-wrap:break-word;
			font-weight: bold;
			color: rgba(#ffffff, 1);
		}
		.p{
			color: rgba(#ffffff, .8);
			font-size: 30rpx;
			line-height: 22px;
			margin-bottom: 30upx;
			width: 750upx;
		}
	}
	image {
		width: 750upx !important;
	}
	img {
		width: 750upx !important;
	}
	.nav-bar{
		padding: 0 30rpx;
		image{
			width: 48rpx !important;
			height: 48rpx ;
			flex-shrink: 0;
		}
	}
}
</style>
